<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: include/hardware/ticks.h Source File</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.1.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('rp2__common_2hardware__ticks_2include_2hardware_2ticks_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle"><div class="title">ticks.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright (c) 2024 Raspberry Pi (Trading) Ltd.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> */</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#ifndef _HARDWARE_TICKS_H</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#define _HARDWARE_TICKS_H</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">#include &quot;<a class="code" href="pico_8h.html">pico.h</a>&quot;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="preprocessor">#if !PICO_RP2040</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="preprocessor">#include &quot;hardware/structs/ticks.h&quot;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="preprocessor">#include &quot;<a class="code" href="rp2__common_2hardware__watchdog_2include_2hardware_2watchdog_8h.html">hardware/watchdog.h</a>&quot;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="group__hardware__ticks.html#ga567ed42c04aa5b006e234d8a4df38b5a">   35</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code hl_enumeration" href="group__hardware__ticks.html#ga567ed42c04aa5b006e234d8a4df38b5a">tick_gen_num_rp2040</a> {</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>    TICK_WATCHDOG = 0,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>    TICK_COUNT</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="group__hardware__ticks.html#gabd515d04e9260f97a63ed0a1415ef4c2">   38</a></span>} <a class="code hl_typedef" href="group__hardware__ticks.html#gaea457044b65d6af680787206c06faa39">tick_gen_num_t</a>;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="comment">// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_HARDWARE_TICKS, Enable/disable assertions in the hardware_ticks module, type=bool, default=0, group=hardware_ticks</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span><span class="preprocessor">#ifndef PARAM_ASSERTIONS_ENABLED_HARDWARE_TICKS</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span><span class="preprocessor">#define PARAM_ASSERTIONS_ENABLED_HARDWARE_TICKS 0</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__ticks.html#gaea97210ea6cb05be8444eef06c10695a">tick_start</a>(<a class="code hl_typedef" href="group__hardware__ticks.html#gaea457044b65d6af680787206c06faa39">tick_gen_num_t</a> tick, uint cycles);</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="keywordtype">void</span> <a class="code hl_function" href="group__hardware__ticks.html#gab09f4714958ebacacafc54856a3169df">tick_stop</a>(<a class="code hl_typedef" href="group__hardware__ticks.html#gaea457044b65d6af680787206c06faa39">tick_gen_num_t</a> tick);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="keywordtype">bool</span> <a class="code hl_function" href="group__hardware__ticks.html#ga2b4d6531a3f9f261dbd4a24883f752b9">tick_is_running</a>(<a class="code hl_typedef" href="group__hardware__ticks.html#gaea457044b65d6af680787206c06faa39">tick_gen_num_t</a> tick);</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>}</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="agroup__hardware__ticks_html_ga2b4d6531a3f9f261dbd4a24883f752b9"><div class="ttname"><a href="group__hardware__ticks.html#ga2b4d6531a3f9f261dbd4a24883f752b9">tick_is_running</a></div><div class="ttdeci">bool tick_is_running(tick_gen_num_t tick)</div><div class="ttdoc">Check if a tick genererator is currently running.</div><div class="ttdef"><b>Definition:</b> ticks.c:36</div></div>
<div class="ttc" id="agroup__hardware__ticks_html_ga567ed42c04aa5b006e234d8a4df38b5a"><div class="ttname"><a href="group__hardware__ticks.html#ga567ed42c04aa5b006e234d8a4df38b5a">tick_gen_num_rp2040</a></div><div class="ttdeci">tick_gen_num_rp2040</div><div class="ttdoc">Tick generator numbers on RP2040 (used as typedef tick_gen_num_t)</div><div class="ttdef"><b>Definition:</b> ticks.h:35</div></div>
<div class="ttc" id="agroup__hardware__ticks_html_gab09f4714958ebacacafc54856a3169df"><div class="ttname"><a href="group__hardware__ticks.html#gab09f4714958ebacacafc54856a3169df">tick_stop</a></div><div class="ttdeci">void tick_stop(tick_gen_num_t tick)</div><div class="ttdoc">Stop a tick generator.</div><div class="ttdef"><b>Definition:</b> ticks.c:26</div></div>
<div class="ttc" id="agroup__hardware__ticks_html_gaea457044b65d6af680787206c06faa39"><div class="ttname"><a href="group__hardware__ticks.html#gaea457044b65d6af680787206c06faa39">tick_gen_num_t</a></div><div class="ttdeci">enum tick_gen_num_rp2350 tick_gen_num_t</div><div class="ttdoc">Tick generator numbers on RP2350 (used as typedef tick_gen_num_t)</div></div>
<div class="ttc" id="agroup__hardware__ticks_html_gaea97210ea6cb05be8444eef06c10695a"><div class="ttname"><a href="group__hardware__ticks.html#gaea97210ea6cb05be8444eef06c10695a">tick_start</a></div><div class="ttdeci">void tick_start(tick_gen_num_t tick, uint cycles)</div><div class="ttdoc">Start a tick generator.</div><div class="ttdef"><b>Definition:</b> ticks.c:9</div></div>
<div class="ttc" id="apico_8h_html"><div class="ttname"><a href="pico_8h.html">pico.h</a></div></div>
<div class="ttc" id="arp2__common_2hardware__watchdog_2include_2hardware_2watchdog_8h_html"><div class="ttname"><a href="rp2__common_2hardware__watchdog_2include_2hardware_2watchdog_8h.html">watchdog.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>